The present invention relates to a method and apparatus for managing read and write cycles of a central processing unit and a peripheral device which exchange data on a common bus to prevent contention.
Traditionally, telephony communications within the United States were handled by the public switched telecommunications network (PSTN). The PSTN can be characterized as a network designed for voice communications, primarily on a circuit-switched basis, with full interconnection among individual networks. The PSTN network is largely analog at the local loop level, digital at the backbone level, and generally provisioned on a wireline, rather than a wireless, basis. The PSTN includes switches that route communications between end users. Circuit switches are the devices that establish connectivity between circuits through an internal switching matrix. Circuit switches set connections between circuits through the establishment of a talk path or transmission path. The connection and the associated bandwidth are provided temporarily, continuously, and exclusively for the duration of the session, or call. While developed to support voice communications, circuit switches can support any form of information transfer (e.g., data and video communications).
In a traditional PSTN environment, circuit switches include central office (CO) exchanges, tandem exchanges, access tandem exchanges, and international gateway facilities. Central offices, also known as exchanges, provide local access services to end users via local loop connections within a relatively small area of geography known as an exchange area. In other words, the CO provides the ability for a subscriber within that neighborhood to connect to another subscriber within that neighborhood. Central offices, also known as end offices, reside at the terminal ends of the network. In other words, COs are the first point of entry into the PSTN and the last point of exit. They are also known as class 5 offices, the lowest class in the switching hierarchy. A class 5 telephone switch communicates with an analog telephone using the analog telephony signals in the well-known analog format. The class 5 telephone switch provides power to the telephone; detects off-hook status of the telephone and provides a dial tone in response; detects dual-tone multi-frequency signals from the caller and initiates a call in the network; plays a ringback tone to the caller when the far-end telephone is ringing; plays a busy tone to the caller when the far-end telephone is busy; provides ring current to the telephone on incoming calls; and provides traditional telephone services such as call waiting, call forwarding, caller ID, etc.
In an effort to increase the amount and speed of information transmitted across networks, the telecommunications industry is shifting toward broadband packet networks which are designed to carry a variety of services such as voice, data, and video. For example, asynchronous transfer mode (ATM) networks have been developed to provide broadband transport and switching capability between local area networks (LANs) and wide area networks (WANs). The Sprint ION network is a broadband network that is capable of delivering a variety of services such as voice, data, and video to an end user at a residential or business location. The Sprint ION network has a wide area IP/ATM or ATM backbone that is connected to a plurality of local loops via multiplexors. Each local loop carries ATM over ADSL (asymmetric digital subscriber line) traffic to a plurality of integrated service hubs (ISHs), which may be at either residential or business locations.
An ISH is a hardware component that links business or residential user devices such as telephones and computers to the broadband, wide area network through a plurality of user interfaces and at least one network interface. A suitable ISH is described in U.S. Pat. No. 6,272,553 entitled “Multi-Services Communications Device,” issued Aug. 7, 2001, which is incorporated by reference herein in its entirety. The network interface typically is a broadband network interface such as ADSL, T1, or HDSL-2. Examples of user interfaces include telephone interfaces such as plain old telephone system (POTS) ports for connecting telephones, fax machines, modems, and the like to the ISH; computer interfaces such as Ethernet ports for connecting computers and local area networks to the ISH; and video ports such as RCA jacks for connecting video players, recorders, monitors, and the like to the ISH.
In providing telephony services over a broadband network, the ISH communicates with a service manager. This connection between the telephone and the network element is typically an ATM connection, which is much different than the traditional analog line to the local switch. ATM connections usually do not support analog telephony signals, such as off-hook, dial tone, and busy signals. Therefore, the ISH must provide many of the telephony functions traditionally provided by the telephone provider central office such as detect off-hook conditions, on-hook connections, and digits as well as provide the telephones with dial tone, ring voltage (sometimes referred to as ring current), ringback, and busy signals. The terms off-hook and off-hook condition as used herein are generic terms meaning that a user device (whether telephone, facsimile machine, modem, etc.) connected to a telephone line is attempting to access and use the line.
The ISH includes a processing core or central processing unit which controls these functions. It must exchange data with numerous peripheral devices within and external to the ISH itself. A data bus is typically used to transfer data. Address and control buses are also provided for controlling the various peripheral devices. The CPU controls data transfer by generating commands or signals indicating when it is ready to read or write data. For example, when the CPU needs to read data from a peripheral, it drives a chip select signal for the selected peripheral and a read command on a control bus and provides the address of a selected memory location on an address bus. In response to these commands, the selected peripheral writes, or drives, the addressed data on the data bus. At the end of the CPU read command, the CPU reads and stores the data which was supplied by the peripheral.
In similar fashion, the CPU sends data to peripheral devices during its write cycles. The CPU sends a chip select and write command on the control bus and provides the address of the desired memory location on the address bus. At the same time, the CPU drives data on the data bus. The selected peripheral responds by reading and storing the data at the end of the write command.
Since a common data bus is used, it is important to control read and write timing so that no two devices try to write or drive a signal onto the bus at the same time. This condition is known as contention. If contention occurs, the data on the bus is meaningless. Contention may result in physical damage to the circuitry. Even if damage does not occur, contention causes high currents and generates more heat.
Advances in processor designs have aggravated the contention problem. The speed of microprocessors has been increased dramatically. With current devices, a processor can begin writing data to a bus within 20 nanoseconds after it has completed a read operation. However, many peripheral devices are much slower. Many take up to 50 nanoseconds after the end of a read operation to enable the high impedance state and stop driving the data bus. When a read operation is followed by a write operation there can be a contention period of up to 30 nanoseconds in which the peripheral is still driving the data bus after the processor has started driving the bus.